package com.group01.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.group01.community.entity.ZyCommunity;
import com.group01.community.entity.vo.ZyCommunityVo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 小区  Mapper 接口
 * </p>
 *
 * @author guoyuan
 * @since 2025-05-01
 */
@Repository
public interface ZyCommunityMapper extends BaseMapper<ZyCommunity> {

    IPage<ZyCommunityVo> getCommunityInterceptor(IPage<ZyCommunity> page, String communityCode, String communityName);

    /**
     * 获取小区和楼栋树
     * @return
     */
    List<ZyCommunityVo> getCommunityAndBuildingTree();

    /**
     * 获取小区和楼栋和单元树
     * @return
     */
    List<ZyCommunityVo> getCommunityAndBuildingAndUnitTree();
}
